﻿using pvdcd;
using System.Collections.Generic;
using System.Data;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Input;
using Template;

namespace Karbel
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Parcalar : Window
    {
        public Parcalar()
        {
            InitializeComponent();
           
            //DataTable dt= Data.Sablonlar();
            //DynaCAD_V2.ConfExpertDataSet ds = new DynaCAD_V2.ConfExpertDataSet();
            //DynaCAD_V2.ConfExpertDataSetTableAdapters.CAD_ParcaTableAdapter ta = new DynaCAD_V2.ConfExpertDataSetTableAdapters.CAD_ParcaTableAdapter();
            //ta.Fill(ds.CAD_Parca);
        }

        public Part Parca { get; set; }
         

        private void gc_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            List<ReferanceTemplate> list = new List<ReferanceTemplate>();

            int[] rows = gc.GetSelectedRowHandles();
            DataRow dr = ((DataRowView)gc.GetRow(rows[0])).Row;

            Parca = Karbel.Data.GetParca(dr);

            this.Close();
        }
    }
}
